Skip to content

docs: document all env vars with descriptions, examples, and required/optional markers#4

Open
devUnixx wants to merge 156 commits into
mainfrom
docs/env-example-318
Open

docs: document all env vars with descriptions, examples, and required/optional markers#4
devUnixx wants to merge 156 commits into
mainfrom
docs/env-example-318

Conversation

@devUnixx
Copy link
Copy Markdown
Owner

Closes AnnabelJoe#318

Changes

Updated apps/web/.env.example to fully document every environment variable:

  • Added a legend at the top explaining [REQUIRED] vs [OPTIONAL]
  • Split the three contract ID variables into separate entries, each with its own description of what the contract does
  • Added [OPTIONAL] marker + fallback behaviour description to LOGTAIL_SOURCE_TOKEN (was missing)
  • Added [OPTIONAL] marker + fallback behaviour description to CORS_ALLOWED_ORIGINS (was missing)
  • Variables grouped by service: Supabase, Stellar/Soroban, Redis, Logging, CORS
  • Safe example values provided for all variables

Acceptance criteria

  • Every variable has an inline comment explaining its purpose
  • Example values provided where safe
  • Required vs optional variables clearly marked
  • Variables grouped by service (Supabase, Redis, Stellar, Logging, CORS)

devnWisdom and others added 8 commits May 29, 2026 12:14
- Hardware requirements (Ed25519 key storage, HSM/TPM recommendations)
- API integration steps (key gen, hash, sign, submit)
- Reference scripts documented
- Certification checklist for new meter models
- Contact information for integration support

Closes AnnabelJoe#320
…belJoe#306)

- npm: weekly on Monday, patch/minor grouped, major flagged for review
- Cargo: weekly on Monday, patch/minor grouped, major flagged for review
- GitHub Actions: monthly, major flagged for review
- Auto-merge for patch-level updates already wired via dependabot-auto-merge.yml

Closes AnnabelJoe#306
- web: 1 GB memory / 1.0 CPU (256 MB / 0.25 CPU reserved)
- supabase-db: 512 MB memory / 0.5 CPU (128 MB / 0.1 CPU reserved)
- redis: 128 MB memory / 0.25 CPU (32 MB / 0.05 CPU reserved)
- README updated with minimum host requirements table

Closes AnnabelJoe#304
- docs/runbooks/contract-deployment.md: testnet/mainnet deploy, verify, rollback
- docs/runbooks/meter-key-rotation.md: scheduled and emergency key rotation
- docs/runbooks/failed-mint-investigation.md: diagnose and retry failed mints
- docs/runbooks/incident-response.md: triage, containment, resolution, postmortem
- docs/runbooks/README.md: index of all runbooks

Closes AnnabelJoe#315
- Enable test task caching in turbo.json (was cache: false)
- Add TURBO_TOKEN/TURBO_TEAM env vars to all CI steps (test, contracts fmt/clippy/test)
- Remote cache signature verification already enabled
…ons (AnnabelJoe#330)

- energy_token: mint, transfer, burn, retire event tests
- audit_registry: anchor event test (topics + data fields verified)
- community_governance: propose, vote, finalize, execute event tests
- Each test verifies event topic and data payload fields
…nnabelJoe#285)

- Document mainnet deployment steps (build, deploy script, initialize, verify)
- Add key management guidance (admin HSM, deployer rotation, minter rotation)
- Add environment separation table (testnet vs mainnet vars)
- Add deployment checklist with sign-off table
- deploy-mainnet.sh already exists and is idempotent; referenced in docs
…le (AnnabelJoe#318)

- Add legend explaining [REQUIRED] vs [OPTIONAL] markers
- Split NEXT_PUBLIC_ENERGY_TOKEN_ID/AUDIT_REGISTRY_ID/COMMUNITY_GOVERNANCE_ID
  into separate entries with individual descriptions
- Add [OPTIONAL] marker and description to LOGTAIL_SOURCE_TOKEN
- Add [OPTIONAL] marker and fallback behaviour note to CORS_ALLOWED_ORIGINS
- Group variables by service: Supabase, Stellar/Soroban, Redis, Logging, CORS
@github-actions
Copy link
Copy Markdown

✅ pnpm audit

4 vulnerabilities found
Severity: 4 moderate

@github-actions
Copy link
Copy Markdown

🔍 Vercel Preview Deployment

URL: Learn More: https://err.sh/vercel/no-credentials-found

Uses Stellar testnet contract addresses.

@github-actions
Copy link
Copy Markdown

✅ cargo audit

�[1m�[32m    Updating�[0m crates.io index
�[1m�[32m     Locking�[0m 188 packages to latest compatible versions
�[1m�[36m      Adding�[0m arbitrary v1.3.2 �[1m�[33m(available: v1.4.2)�[0m
�[1m�[36m      Adding�[0m crypto-common v0.1.6 �[1m�[33m(available: v0.1.7)�[0m
�[1m�[36m      Adding�[0m derive_arbitrary v1.3.2 �[1m�[33m(available: v1.4.2)�[0m
�[1m�[36m      Adding�[0m soroban-builtin-sdk-macros v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-common v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-guest v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-host v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-macros v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-sdk v23.5.3 �[1m�[33m(available: v25.3.0)�[0m
�[0m�[0m�[1m�[32m    Fetching�[0m advisory database from `https://github.com/RustSec/advisory-db.git`
�[0m�[0m�[1m�[32m      Loaded�[0m 1098 security advisories (from /home/runner/.cargo/advisory-db)
�[0m�[0m�[1m�[32m    Updating�[0m crates.io index
�[0m�[0m�[1m�[32m    Scanning�[0m Cargo.lock for vulnerabilities (192 crate dependencies)
�[0m�[0m�[1m�[33mCrate:    �[0m derivative
�[0m�[0m�[1m�[33mVersion:  �[0m 2.2.0
�[0m�[0m�[1m�[33mWarning:  �[0m unmaintained
�[0m�[0m�[1m�[33mTitle:    �[0m `derivative` is unmaintained; consider using an alternative
�[0m�[0m�[1m�[33mDate:     �[0m 2024-06-26
�[0m�[0m�[1m�[33mID:       �[0m RUSTSEC-2024-0388
�[0m�[0m�[1m�[33mURL:      �[0m https://rustsec.org/advisories/RUSTSEC-2024-0388
�[0m�[0m�[1m�[33mDependency tree:
�[0mderivative 2.2.0
├── ark-poly 0.4.2
│   └── ark-ec 0.4.2
│       ├── soroban-env-host 23.0.1
│       │   ├── soroban-sdk 23.5.3
│       │   │   ├── multisig-admin 1.0.0
│       │   │   ├── energy-token 1.0.0
│       │   │   ├── community-governance 1.0.0
│       │   │   └── audit-registry 1.0.0
│       │   └── soroban-ledger-snapshot 23.5.3
│       │       └── soroban-sdk 23.5.3
│       └── ark-bls12-381 0.4.0
│           └── soroban-env-host 23.0.1
├── ark-ff 0.4.2
│   ├── soroban-env-host 23.0.1
│   ├── ark-poly 0.4.2
│   ├── ark-ec 0.4.2
│   └── ark-bls12-381 0.4.0
└── ark-ec 0.4.2

�[0m�[0m�[1m�[33mCrate:    �[0m paste
�[0m�[0m�[1m�[33mVersion:  �[0m 1.0.15
�[0m�[0m�[1m�[33mWarning:  �[0m unmaintained
�[0m�[0m�[1m�[33mTitle:    �[0m paste - no longer maintained
�[0m�[0m�[1m�[33mDate:     �[0m 2024-10-07
�[0m�[0m�[1m�[33mID:       �[0m RUSTSEC-2024-0436
�[0m�[0m�[1m�[33mURL:      �[0m https://rustsec.org/advisories/RUSTSEC-2024-0436
�[0m�[0m�[1m�[33mDependency tree:
�[0mpaste 1.0.15
├── wasmi_core 0.13.0
│   └── soroban-wasmi 0.31.1-soroban.20.0.1
│       ├── soroban-env-host 23.0.1
│       │   ├── soroban-sdk 23.5.3
│       │   │   ├── multisig-admin 1.0.0
│       │   │   ├── energy-token 1.0.0
│       │   │   ├── community-governance 1.0.0
│       │   │   └── audit-registry 1.0.0
│       │   └── soroban-ledger-snapshot 23.5.3
│       │       └── soroban-sdk 23.5.3
│       └── soroban-env-common 23.0.1
│           ├── soroban-sdk-macros 23.5.3
│           │   └── soroban-sdk 23.5.3
│           ├── soroban-ledger-snapshot 23.5.3
│           ├── soroban-env-host 23.0.1
│           └── soroban-env-guest 23.0.1
│               └── soroban-sdk 23.5.3
└── ark-ff 0.4.2
    ├── soroban-env-host 23.0.1
    ├── ark-poly 0.4.2
    │   └── ark-ec 0.4.2
    │       ├── soroban-env-host 23.0.1
    │       └── ark-bls12-381 0.4.0
    │           └── soroban-env-host 23.0.1
    ├── ark-ec 0.4.2
    └── ark-bls12-381 0.4.0

�[0m�[0m�[1m�[33mwarning:�[0m 2 allowed warnings found

devEunicee and others added 19 commits May 29, 2026 16:05
…ation

feat: log aggregation and retention
## [1.9.0](AnnabelJoe/solarproof@v1.8.2...v1.9.0) (2026-05-29)

### Features

* configure log aggregation and retention ([AnnabelJoe#299](AnnabelJoe#299)) ([3ee0154](AnnabelJoe@3ee0154))
- Implement bucketed storage to reduce ledger entries
- Move idempotency nonces to temporary storage
- Remove redundant reading_hash from storage values
- Update and expand test suite

Closes AnnabelJoe#281
- Added guidance for quorum, thresholds, and durations
- Included configurations for small, medium, and large DAOs
- Linked guide from community_governance contract docs

Closes AnnabelJoe#279
- Implement bucketed storage to reduce ledger entries
- Move idempotency nonces to temporary storage
- Remove redundant reading_hash from storage values
- Update and expand test suite
- Include regression test test_issue_281_bucket_collision

Closes AnnabelJoe#281
…tion

Add pagination and filtering to certificates
## [1.10.0](AnnabelJoe/solarproof@v1.9.0...v1.10.0) (2026-05-30)

### Features

* add pagination and filtering to certificates [AnnabelJoe#258](AnnabelJoe#258) ([4d2bde0](AnnabelJoe@4d2bde0))
…boundaries

Implement error boundary components
## [1.11.0](AnnabelJoe/solarproof@v1.10.0...v1.11.0) (2026-05-30)

### Features

* implement global and section error boundaries [AnnabelJoe#256](AnnabelJoe#256) ([cc85f83](AnnabelJoe@cc85f83))
AnnabelJoe added 25 commits June 3, 2026 06:53
…letons

feat: add loading skeletons for async data fetches (AnnabelJoe#255)
…nbooks-315

docs: add operational runbooks
…hart-websocket

feat(web): real-time energy chart with WebSocket + polling fallback
…omments

docs(contracts): add Rust doc comments to all public contract functions
…checklist

docs: Stellar mainnet deployment checklist and go-live plan
…ge-80

test(web): achieve 80% API route coverage with CI enforcement
…pgrade-timelock

feat(contracts): add contract upgrade timelock tests
…ocation

feat: implement meter key revocation mechanism
…istence

ops: configure Redis persistence and eviction policy
…policy

docs: create SECURITY.md with vulnerability disclosure policy
…-integration-guide-320

docs: add hardware meter integration guide
…etup-306

devops: configure Dependabot for npm, Cargo, and GitHub Actions
…rce-limits-304

devops: add resource limits to Docker Compose services
…he-297

feat: Turborepo remote caching for all CI steps
…ests-330

test: add contract event emission tests for all state-changing functions
…nt-285

docs: mainnet deployment process, key management, and checklist
Comment thread apps/web/next.config.ts

const withNextIntl = createNextIntlPlugin('./src/i18n.ts')

const securityHeaders = [
Comment thread apps/web/next.config.ts
},
]

const securityHeaders = [
* Tests for useWallet hook using the mock Freighter wallet.
* Runs headlessly in CI — no browser extension required.
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
readings: { meter_id: 'meter-1' },
}

function mockDb(data: unknown[], error: unknown = null, count = 1) {
#[test]
#[should_panic(expected = "no pending upgrade")]
fn cancel_upgrade_no_pending_panics() {
let (env, admin, client) = setup();
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

✅ cargo audit

�[1m�[32m    Updating�[0m crates.io index
�[1m�[32m     Locking�[0m 188 packages to latest compatible versions
�[1m�[36m      Adding�[0m arbitrary v1.3.2 �[1m�[33m(available: v1.4.2)�[0m
�[1m�[36m      Adding�[0m crypto-common v0.1.6 �[1m�[33m(available: v0.1.7)�[0m
�[1m�[36m      Adding�[0m derive_arbitrary v1.3.2 �[1m�[33m(available: v1.4.2)�[0m
�[1m�[36m      Adding�[0m soroban-builtin-sdk-macros v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-common v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-guest v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-host v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-env-macros v23.0.1 �[1m�[33m(available: v23.0.2)�[0m
�[1m�[36m      Adding�[0m soroban-sdk v23.5.3 �[1m�[33m(available: v25.3.0)�[0m
�[0m�[0m�[1m�[32m    Fetching�[0m advisory database from `https://github.com/RustSec/advisory-db.git`
�[0m�[0m�[1m�[32m      Loaded�[0m 1105 security advisories (from /home/runner/.cargo/advisory-db)
�[0m�[0m�[1m�[32m    Updating�[0m crates.io index
�[0m�[0m�[1m�[32m    Scanning�[0m Cargo.lock for vulnerabilities (192 crate dependencies)
�[0m�[0m�[1m�[33mCrate:    �[0m derivative
�[0m�[0m�[1m�[33mVersion:  �[0m 2.2.0
�[0m�[0m�[1m�[33mWarning:  �[0m unmaintained
�[0m�[0m�[1m�[33mTitle:    �[0m `derivative` is unmaintained; consider using an alternative
�[0m�[0m�[1m�[33mDate:     �[0m 2024-06-26
�[0m�[0m�[1m�[33mID:       �[0m RUSTSEC-2024-0388
�[0m�[0m�[1m�[33mURL:      �[0m https://rustsec.org/advisories/RUSTSEC-2024-0388
�[0m�[0m�[1m�[33mDependency tree:
�[0mderivative 2.2.0
├── ark-poly 0.4.2
│   └── ark-ec 0.4.2
│       ├── soroban-env-host 23.0.1
│       │   ├── soroban-sdk 23.5.3
│       │   │   ├── multisig-admin 1.0.0
│       │   │   ├── energy-token 1.0.0
│       │   │   ├── community-governance 1.0.0
│       │   │   └── audit-registry 1.0.0
│       │   └── soroban-ledger-snapshot 23.5.3
│       │       └── soroban-sdk 23.5.3
│       └── ark-bls12-381 0.4.0
│           └── soroban-env-host 23.0.1
├── ark-ff 0.4.2
│   ├── soroban-env-host 23.0.1
│   ├── ark-poly 0.4.2
│   ├── ark-ec 0.4.2
│   └── ark-bls12-381 0.4.0
└── ark-ec 0.4.2

�[0m�[0m�[1m�[33mCrate:    �[0m paste
�[0m�[0m�[1m�[33mVersion:  �[0m 1.0.15
�[0m�[0m�[1m�[33mWarning:  �[0m unmaintained
�[0m�[0m�[1m�[33mTitle:    �[0m paste - no longer maintained
�[0m�[0m�[1m�[33mDate:     �[0m 2024-10-07
�[0m�[0m�[1m�[33mID:       �[0m RUSTSEC-2024-0436
�[0m�[0m�[1m�[33mURL:      �[0m https://rustsec.org/advisories/RUSTSEC-2024-0436
�[0m�[0m�[1m�[33mDependency tree:
�[0mpaste 1.0.15
├── wasmi_core 0.13.0
│   └── soroban-wasmi 0.31.1-soroban.20.0.1
│       ├── soroban-env-host 23.0.1
│       │   ├── soroban-sdk 23.5.3
│       │   │   ├── multisig-admin 1.0.0
│       │   │   ├── energy-token 1.0.0
│       │   │   ├── community-governance 1.0.0
│       │   │   └── audit-registry 1.0.0
│       │   └── soroban-ledger-snapshot 23.5.3
│       │       └── soroban-sdk 23.5.3
│       └── soroban-env-common 23.0.1
│           ├── soroban-sdk-macros 23.5.3
│           │   └── soroban-sdk 23.5.3
│           ├── soroban-ledger-snapshot 23.5.3
│           ├── soroban-env-host 23.0.1
│           └── soroban-env-guest 23.0.1
│               └── soroban-sdk 23.5.3
└── ark-ff 0.4.2
    ├── soroban-env-host 23.0.1
    ├── ark-poly 0.4.2
    │   └── ark-ec 0.4.2
    │       ├── soroban-env-host 23.0.1
    │       └── ark-bls12-381 0.4.0
    │           └── soroban-env-host 23.0.1
    ├── ark-ec 0.4.2
    └── ark-bls12-381 0.4.0

�[0m�[0m�[1m�[33mwarning:�[0m 2 allowed warnings found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document environment variables with descriptions and examples